<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="css1.css">
    <script>
        window.onload = function(){
            var btn = document.querySelectorAll('.btn1')
            var link = document.querySelector('link')
            
            for(var i=0;i<btn.length;i++){
                btn[i].onclick = function(){
                    var cn = this.getAttribute('data-cn')
                    // console.log(this);
                    link.href = cn+'.css' 
                }
            }
            
            
        }
    </script>
</head>
<body>
    <dl id="message">
        <form>
            <dt>
                <strong>可以换肤的提交框：</strong>
                <input class="btn1" data-cn="css1" type="button" value="皮肤1" />
                <input class="btn1" data-cn="css2" type="button" value="皮肤2" />
            </dt>
            <dd>输入姓名：<input class="text" type="text" /></dd>
            <dd>输入密码：<input class="text" type="password" /></dd>
            <dd>请您留言：<textarea></textarea></dd>
            <dd class="center"><input class="btn" type="submit" value="提交" /></dd>
        </form>
    </dl>
</body>
</html>